import request from '@/utils/request'

// 查询库存监控列表
export function listStock(query) {
  return request({
    url: '/statistics/stock/list',
    method: 'get',
    params: query
  })
}

// 获取库存统计数据
export function getStatistics(query) {
  return request({
    url: '/statistics/stock/statistics',
    method: 'get',
    params: query
  })
}

// 获取库存变动趋势
export function getTrend(query) {
  return request({
    url: '/statistics/stock/trend',
    method: 'get',
    params: query
  })
}

// 获取预警商品列表
export function getWarningProducts(query) {
  return request({
    url: '/statistics/stock/warning',
    method: 'get',
    params: query
  })
}

// 导出库存监控数据
export function exportStock(query) {
  return request({
    url: '/statistics/stock/export',
    method: 'post',
    data: query
  })
}